package main

import (
	grpc2 "google.golang.org/grpc"
	"kill/common/consul"
	"kill/common/grpc"
	"kill/common/models/es"
	"kill/common/models/log"
	"kill/common/models/mysql"
	"kill/common/models/redis"
	"kill/common/nacos"
	"kill/common/viper"
	"kill/service/internal"
)

func main() {
	viper.GetViper()
	nacos.NewNacos(func() {
		mysql.InitMysql()
		redis.RedisInit()
	})
	nac := nacos.NacosConfig
	consul.Consul()
	mysql.InitMysql()
	redis.RedisInit()
	es.ESInit()
	log.InitLog()
	grpc.RegisterGrpc(nac.Grpc.Host, nac.Grpc.Port, func(server *grpc2.Server) {
		internal.Register(server)
	})

}
